﻿<Window x:Class="Meow.FR.Rincevent.IO.SmartFM.WndMain"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Themes="clr-namespace:WPF.Themes;assembly=WPF.Themes"
    Themes:ThemeManager.Theme="ExpressionDark"
    Background="{DynamicResource WindowBackgroundBrush}"
    SizeToContent="Height" WindowStartupLocation="CenterScreen"
    Title="Smart.fm lists Importer" Height="198" Width="400">
    <Window.Resources>
        <Style TargetType="{x:Type TextBlock}">
            <Setter Property="Foreground" Value="#BDBDBD" />
            <Setter Property="Margin" Value="2" />
        </Style>
    </Window.Resources>
    <DockPanel LastChildFill="True" Name="pnlSmart">
        <DockPanel DockPanel.Dock="Top" LastChildFill="True">
            <DockPanel LastChildFill="True">
                <TextBlock Margin="2" Text="List #: " VerticalAlignment="Center" />
                <Button Margin="2" Width="80" DockPanel.Dock="Right" Click="Button_Click" IsEnabled="{Binding Path=IsIdle}">Start !</Button>
                <TextBox Margin="2" Text="{Binding Path=ListId, Mode=TwoWay}"></TextBox>
            </DockPanel>
        </DockPanel>
        <DockPanel DockPanel.Dock="Bottom">
            <StatusBar Background="Black" Foreground="White">
                <StatusBarItem>
                    <TextBlock Text="{Binding Path=Status, Mode=TwoWay}"></TextBlock>
                </StatusBarItem>
                <StatusBarItem HorizontalAlignment="Right">
                    <ProgressBar Width="240" Height="18" Value="{Binding Path=Loaded, Mode=TwoWay}" Maximum="{Binding Path=Count, Mode=OneWay}"></ProgressBar>
                </StatusBarItem>
            </StatusBar>
        </DockPanel>
        <DockPanel>
            <DockPanel LastChildFill="True">
                <Grid Margin="2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="20" />
                        <ColumnDefinition Width="35" />
                        <ColumnDefinition />
                        <ColumnDefinition Width="35" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    
                    <CheckBox Grid.Row="0" Grid.Column="0" IsChecked="{Binding Path=HasText, Mode=OneWay}"></CheckBox>
                    <TextBlock Grid.Row="0" Grid.Column="1">Value:</TextBlock>
                    <TextBlock Grid.Row="0" Grid.Column="2" Text="{Binding Path=Current.Text, Mode=OneWay}" TextAlignment="Center"></TextBlock>
                    <TextBlock Grid.Row="0" Grid.Column="3">Name:</TextBlock>
                    <TextBox Grid.Row="0" Grid.Column="4" Text="{Binding Path=TextColumn, Mode=TwoWay}"></TextBox>

                    <CheckBox Grid.Row="1" Grid.Column="0" IsChecked="{Binding Path=HasCharacters, Mode=OneWay}"></CheckBox>
                    <TextBlock Grid.Row="1" Grid.Column="1">Value:</TextBlock>
                    <TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding Path=Current.Character, Mode=OneWay}" TextAlignment="Center"></TextBlock>
                    <TextBlock Grid.Row="1" Grid.Column="3">Name:</TextBlock>
                    <TextBox Grid.Row="1" Grid.Column="4" Text="{Binding Path=CharacterColumn, Mode=TwoWay}"></TextBox>

                    <TextBlock Grid.Row="2" Grid.Column="1">Value:</TextBlock>
                    <TextBlock Grid.Row="2" Grid.Column="2" Text="{Binding Path=Current.Response, Mode=OneWay}" TextAlignment="Center"></TextBlock>
                    <TextBlock Grid.Row="2" Grid.Column="3">Name:</TextBlock>
                    <TextBox Grid.Row="2" Grid.Column="4" Text="{Binding Path=ResponseColumn, Mode=TwoWay}"></TextBox>

                    <TextBlock Grid.Row="3" Grid.ColumnSpan="5" TextWrapping="Wrap" TextAlignment="Justify" Padding="2">Smart.fm Importer has for aim to transform a Smart.fm's list in a Rincevent list. Input the ID of the list (you can found it on the website http://smart.fm by looking in the url -> if it is '/goals/701', the ID is 707) then click 'Start'. While it's loading, you can check the current content and adapt the column names (Japanese and English by default).</TextBlock>
                </Grid>
            </DockPanel>
        </DockPanel>
    </DockPanel>
</Window>
